//
//  VmdbCAJLCFListRecordTableViewCellcbXRww.m
//  Jlcf_ios
//
//  Created by zl on 2018/10/18.
//  Copyright © 2018年 ski. All rights reserved.
//

#import "VmdbCAJLCFListRecordTableViewCellcbXRww.h"

@interface VmdbCAJLCFListRecordTableViewCellcbXRww ()

@property (nonatomic, strong) UILabel *jyvhKwphoneLabelpopXEs;

@property (nonatomic, strong) UILabel *ZDJcUsaccountLabelfsESOo;

@property (nonatomic, strong) UILabel *hnRcVmtimeLabelncDSPi;

@property (nonatomic, strong) UIView *line;

@end
@implementation VmdbCAJLCFListRecordTableViewCellcbXRww

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

//-(void)reloadDataWithIfENDCell:(Boolean)isEedCell{
//
//}

-(void)reloadDataWithIfENDCell:(Boolean)isEedCell{
    
    if (!self.jyvhKwphoneLabelpopXEs) {
        self.jyvhKwphoneLabelpopXEs = [UILabel new];
        self.jyvhKwphoneLabelpopXEs.centerY = 18;
        self.jyvhKwphoneLabelpopXEs.left = 25;
        self.jyvhKwphoneLabelpopXEs.width = self.width/3;
        self.jyvhKwphoneLabelpopXEs.height = 15;
        self.jyvhKwphoneLabelpopXEs.textAlignment = NSTextAlignmentCenter;
        [self addSubview:self.jyvhKwphoneLabelpopXEs];
    }
    
    if (self.jyvhKwphoneLabelpopXEs) {
        if (!_data) {
            self.jyvhKwphoneLabelpopXEs.textColor = QTZ_Black;
            self.jyvhKwphoneLabelpopXEs.font = FONT(15);
            self.jyvhKwphoneLabelpopXEs.text = @"出借用户";
        }else{
            self.jyvhKwphoneLabelpopXEs.textColor = QTZ_Gray102;
            self.jyvhKwphoneLabelpopXEs.font = FONT(13);
            self.jyvhKwphoneLabelpopXEs.text = _data.username;
        }
        
//        [self.jyvhKwphoneLabelpopXEs sizeToFit];
        
    }
    
    
    if(!_ZDJcUsaccountLabelfsESOo){
        self.ZDJcUsaccountLabelfsESOo = [UILabel new];
        self.ZDJcUsaccountLabelfsESOo.top = self.jyvhKwphoneLabelpopXEs.top;
        self.ZDJcUsaccountLabelfsESOo.left = self.jyvhKwphoneLabelpopXEs.right;
        self.ZDJcUsaccountLabelfsESOo.width = self.width/3;
        self.ZDJcUsaccountLabelfsESOo.height = 15;
        self.ZDJcUsaccountLabelfsESOo.textAlignment =NSTextAlignmentCenter;
        
//        self.ZDJcUsaccountLabelfsESOo.center = self.center;
        [self addSubview:self.ZDJcUsaccountLabelfsESOo];
    }
    
    if (self.ZDJcUsaccountLabelfsESOo) {
        if (!_data) {
            self.ZDJcUsaccountLabelfsESOo.textColor = QTZ_Black;
            self.ZDJcUsaccountLabelfsESOo.font = FONT(15);
            self.ZDJcUsaccountLabelfsESOo.text = @"出借金额";
        }else{
            self.ZDJcUsaccountLabelfsESOo.textColor = QTZ_Gray102;
            self.ZDJcUsaccountLabelfsESOo.font = FONT(13);
            self.ZDJcUsaccountLabelfsESOo.text = _data.account;
        }
//        [self.ZDJcUsaccountLabelfsESOo sizeToFit];
    }
    
    if (!self.hnRcVmtimeLabelncDSPi) {
        self.hnRcVmtimeLabelncDSPi = [UILabel new];
        self.hnRcVmtimeLabelncDSPi.left = self.ZDJcUsaccountLabelfsESOo.right;
        self.hnRcVmtimeLabelncDSPi.top = self.jyvhKwphoneLabelpopXEs.top;
        self.hnRcVmtimeLabelncDSPi.width = FULL_WIDTH/3;
        self.hnRcVmtimeLabelncDSPi.height = 15;
        self.hnRcVmtimeLabelncDSPi.textAlignment = NSTextAlignmentCenter;
        [self addSubview:self.hnRcVmtimeLabelncDSPi];
    }
    if (self.hnRcVmtimeLabelncDSPi) {
        if (!_data) {
            self.hnRcVmtimeLabelncDSPi.textColor = QTZ_Black;
            self.hnRcVmtimeLabelncDSPi.font = FONT(15);
            self.hnRcVmtimeLabelncDSPi.text = @"出借时间";
        }else{
            self.hnRcVmtimeLabelncDSPi.textColor = QTZ_Gray102;
            self.hnRcVmtimeLabelncDSPi.font = FONT(13);
            self.hnRcVmtimeLabelncDSPi.text = _data.addtime;
        }
       
//        [self.hnRcVmtimeLabelncDSPi sizeToFit];
    }
    
    if (!self.line) {
        self.line = [[UIView alloc] initWithFrame:CGRectMake(10, 44, FULL_WIDTH - 20, 1)];
        self.line.backgroundColor = QTZ_Gray237;
        [self addSubview:self.line];
    }
    
    if (self.line) {
        self.line.hidden  = isEedCell;
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
